package avicit.bdp.dds.server.master.dispatch.host.assign;

/**
 * host selector
 */
public enum HostSelector {

    RANDOM,

    ROUNDROBIN,

    LOWERWEIGHT;

    public static HostSelector of(String selector){
        for(HostSelector hs : values()){
            if(hs.name().equalsIgnoreCase(selector)){
                return hs;
            }
        }
        throw new IllegalArgumentException("invalid host selector : " + selector);
    }
}
